/*
 * 
 *  jiangcheng
 *  
 */

package com.uhaou.web.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import org.apache.commons.lang.StringUtils;

import com.uhaou.common.base.*;
import com.uhaou.common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.uhaou.web.model.*;
import com.uhaou.web.dao.*;
import com.uhaou.web.service.*;
import com.uhaou.web.vo.query.*;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


public class WebGroup extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "WebGroup";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_GROUP_NAME = "groupName";
	public static final String ALIAS_GROUP_LOG = "groupLog";
	public static final String ALIAS_PUB_STATUS = "pubStatus";
	public static final String ALIAS_GROUP_TYPE = "groupType";
	public static final String ALIAS_GROUP_IDU = "groupIdu";
	public static final String ALIAS_GROUP_PUR = "groupPur";
	public static final String ALIAS_ADD_METHOD = "addMethod";
	public static final String ALIAS_GROUP_WEB = "groupWeb";
	public static final String ALIAS_GROUP_PHONE = "groupPhone";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DATE = "createDate";
	public static final String ALIAS_GROUP_STATE = "groupState";
	public static final String ALIAS_GROUP_SORT = "groupSort";
	
	//date formats
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Length(max=32)
	private java.lang.String id;
	@Length(max=200)
	private java.lang.String groupName;
	@Length(max=200)
	private java.lang.String groupLog;
	@Length(max=32)
	private java.lang.String pubStatus;
	@Length(max=32)
	private java.lang.String groupType;
	@Length(max=500)
	private java.lang.String groupIdu;
	@Length(max=500)
	private java.lang.String groupPur;
	@Length(max=32)
	private java.lang.String addMethod;
	@Length(max=200)
	private java.lang.String groupWeb;
	@Length(max=200)
	private java.lang.String groupPhone;
	@Length(max=32)
	private java.lang.String creator;
	
	private java.util.Date createDate;
	@Length(max=32)
	private java.lang.String groupState;
	
	private Long groupSort;
	//columns END

	public WebGroup(){
	}

	public WebGroup(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setGroupName(java.lang.String value) {
		this.groupName = value;
	}
	
	public java.lang.String getGroupName() {
		return this.groupName;
	}
	public void setGroupLog(java.lang.String value) {
		this.groupLog = value;
	}
	
	public java.lang.String getGroupLog() {
		return this.groupLog;
	}
	public void setPubStatus(java.lang.String value) {
		this.pubStatus = value;
	}
	
	public java.lang.String getPubStatus() {
		return this.pubStatus;
	}
	public void setGroupType(java.lang.String value) {
		this.groupType = value;
	}
	
	public java.lang.String getGroupType() {
		return this.groupType;
	}
	public void setGroupIdu(java.lang.String value) {
		this.groupIdu = value;
	}
	
	public java.lang.String getGroupIdu() {
		return this.groupIdu;
	}
	public void setGroupPur(java.lang.String value) {
		this.groupPur = value;
	}
	
	public java.lang.String getGroupPur() {
		return this.groupPur;
	}
	public void setAddMethod(java.lang.String value) {
		this.addMethod = value;
	}
	
	public java.lang.String getAddMethod() {
		return this.addMethod;
	}
	public void setGroupWeb(java.lang.String value) {
		this.groupWeb = value;
	}
	
	public java.lang.String getGroupWeb() {
		return this.groupWeb;
	}
	public void setGroupPhone(java.lang.String value) {
		this.groupPhone = value;
	}
	
	public java.lang.String getGroupPhone() {
		return this.groupPhone;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,java.util.Date.class));
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	public void setGroupState(java.lang.String value) {
		this.groupState = value;
	}
	
	public java.lang.String getGroupState() {
		return this.groupState;
	}
	public void setGroupSort(Long value) {
		this.groupSort = value;
	}
	
	public Long getGroupSort() {
		return this.groupSort;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("GroupName",getGroupName())
			.append("GroupLog",getGroupLog())
			.append("PubStatus",getPubStatus())
			.append("GroupType",getGroupType())
			.append("GroupIdu",getGroupIdu())
			.append("GroupPur",getGroupPur())
			.append("AddMethod",getAddMethod())
			.append("GroupWeb",getGroupWeb())
			.append("GroupPhone",getGroupPhone())
			.append("Creator",getCreator())
			.append("CreateDate",getCreateDate())
			.append("GroupState",getGroupState())
			.append("GroupSort",getGroupSort())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof WebGroup == false) return false;
		if(this == obj) return true;
		WebGroup other = (WebGroup)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

